﻿Imports System.Windows.Forms

Public Class frmSelect2Series

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub lst_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstSeries1.DoubleClick, lstSeries2.DoubleClick
        btnOK.PerformClick()
    End Sub

    Private Sub lst_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstSeries1.SelectedIndexChanged, lstSeries2.SelectedIndexChanged
        btnOK.Enabled = lstSeries1.SelectedIndex <> -1 And lstSeries2.SelectedIndex <> -1
    End Sub
End Class
